home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
Y2Kfix.pxl
< prev
Wrap
Text File
|
2000-12-23
|
4KB
|
147 lines
{ Filename : Y2Kfix.pxl
Purpose : This PC has a BIOS that doesn't understand Y2K dates
Date : December 26, 1999
Author : Stewart DIBBS, VYSOR Integration Inc
History:
Version : 4.20 RELEASE
Update :
Date :
--------------------------------------------------------------------------}
Initialize: {only one instance allowed}
UseCoordinates(PIXEL)
Title$ = "Correcting the Y2K BIOS bug"
WinExist(Title$,Res)
If Res = 0 Then Goto One_Instance
Beep
WinSetActive(Title$,Res)
WinShow(Title$,RESTORE,Res)
End
One_Instance:
UseCaption(Title$) {change the title}
WinLocate(Title$,250,204,830,568,Res)
UseBackground(TRANSPARENT,0,128,192)
WinShow(Title$,NOTOPMOST,Res)
DrawBackGround
DirGet(SourceDir$) {used later for library function calls}
{DragAcceptFile(ENABLE,AcceptFile)}
AutoProgressBar(DISABLE)
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("&File",IGNORE,
"E&xit!",Terminate,
ENDPOPUP,
"&Information",IGNORE,
"&Concept",Concept,
SEPARATOR,
"&About",About,
ENDPOPUP)
GetLocalTime(Year,Month,DayOfWeek,DayOfMonth,Hour,Minutes)
Year = 2000
SetLocalTime(Year,Month,DayOfWeek,DayOfMonth,Hour,Minutes)
{GoSub MakeToolbar
ChangeMenuItem("&ToolBar",CHECK,TBRes) }
StatusWindow(ENABLE,BOTTOM,3,300,500,-1,0)
DrawStatusWinText(0,"Ready")
GoSub DrawBanner
ChangeMenuItem("&StatusBar",CHECK,SBRes)
Wait_for_Input:
WaitInput()
Terminate:
End
Concept:
MessageBox(OK,1,INFORMATION,
"This is a skeleton of a PiXCL application. You could briefly
describe your application's function here, or provide some
basic help information.",
"PiXCL Skeleton Concept",Res)
Goto Wait_for_Input
ShowAppHelp:
{An application Help file usually has the same name as the application.}
Winhelp("Y2Kfix.hlp",CONTENTS,"")
Goto Wait_for_Input
About:
AboutUser("Correcting the Y2K BIOS bug", { or substitute Title$}
"Two lines of text goes here e.g. Application function.",
"Four Lines of additional information goes here, perhaps contact information and Web addresses")
Goto Wait_for_Input
ViewToolBar:
GetMenuStatus("&ToolBar",CHECKED,Res)
If Res = 0
GoSub MakeToolbar
ChangeMenuItem("&ToolBar",CHECK,Res)
Else
Toolbar()
ChangeMenuItem("&ToolBar",UNCHECK,Res)
Endif
Goto Wait_for_Input
ViewStatusBar:
GetMenuStatus("&StatusBar",CHECKED, Res)
If Res = 0
StatusWindow(ENABLE,BOTTOM,3,300,500,-1,0)
DrawStatusWinText(0,"Ready")
ChangeMenuItem("&StatusBar",CHECK,Res)
Else
StatusWindow(DISABLE,BOTTOM,3,300,500,-1,0)
ChangeMenuItem("&StatusBar",UNCHECK,Res)
Endif
Goto Wait_for_Input
CorrectDate:
SetMouse()
DrawBackground
{
DirGetWindows(WinDir$)
DirGetSystem(WinSys$)
{Loop through the CPL file arguments and see what these applets do}
Ansi("0",Index)
Cmd$ = WinDir$ + "\rundll32.exe shell32.dll,Control_RunDLL "
Cmd$ = Cmd$ + WinSys$ + "\timedate.cpl" + ",@0"
Run(Cmd$)
}
End
{--- Style Suggestion: place all subroutines at the end of the script.}
DrawBanner: {subroutine}
UseFont("Arial",13,27,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawShadowTextExt(40,40,500,300,
"This PC has a non-Y2K compliant BIOS, and the year is wrong (ie 2094). You must set the correct date and year NOW, or any files you create will have an invalid creation date, and other software will behave in unpredictable ways! ",CENTER,0,0,0,1)
UseFont("Arial",7,15,NOBOLD,NOITALIC,NOUNDERLINE,255,255,255)
DrawShadowText(300,250,"Click anywhere to continue",0,0,0,1)
WinGetClientRect("",x1,y1,x2,y2)
SetMouse(x1,y1,x2,y2,CorrectDate,n,n)
Return(Stringinue",0,0,0,1)
WinGetClientRect("",x1,y1,x2,y2)
SetMouse(x1,y1,x2,y2,CorrectDate,n,n)
Return